# Set params
N <- 100000  
S1 <- seq(0, 4, 0.5) 
S2 <- 1 
nsims <- 500
X_err_vec <- c(S1, S2)

params <- expand.grid(N = N, S1 = S1, S2 = S2)

set.seed(02138)

sims_m_params <- lapply(1:nrow(params), FUN = function(i) {
  X_err_vec <- c(params[i, 'S1'], params[i, 'S2'])
  sims <- simulationFn(DGP = 3, N = params[i, 'N'], X_err_vec = X_err_vec, bootstrap_var = FALSE, nsims = nsims)
  return(sims)
  
})

save(sims_m_params, file = "simulation_output/main_sims.Rdata")
